package icu.thatyear.main.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 系统日志
 * </p>
 *
 * @author Cjy
 * @since 2024-12-06
 */
@Getter
@Setter
@TableName("tz_sys_log")
@Schema(name = "TzSysLog", description = "系统日志")
public class TzSysLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "用户名")
    @TableField("username")
    private String username;

    @Schema(description = "用户操作")
    @TableField("operation")
    private String operation;

    @Schema(description = "请求方法")
    @TableField("method")
    private String method;

    @Schema(description = "请求参数")
    @TableField("params")
    private String params;

    @Schema(description = "执行时长(毫秒)")
    @TableField("time")
    private Long time;

    @Schema(description = "IP地址")
    @TableField("ip")
    private String ip;

    @Schema(description = "创建时间")
    @TableField("create_date")
    private LocalDateTime createDate;
}
